package com.kgc.storeprovider.controller;

import com.kgc.basic.util.ResponseMsg;
import com.kgc.store.pojo.InventoryProfitDetail;
import com.kgc.store.remote.InventoryProfitDetailRemote;
import com.kgc.storeprovider.service.InventoryProfitDetailService;
import com.kgc.storeprovider.service.InventoryProfitService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class InventoryProfitDetailController implements InventoryProfitDetailRemote {


    private Logger logger = LoggerFactory.getLogger(getClass());
    @Autowired
    private InventoryProfitDetailService inventoryProfitDetailService;

    @Override
    public ResponseMsg getInventoryProfitDetailList(String inventoryProfitCode) {
        logger.info("InventoryProfitDetailController getInventoryProfitDetailList inventoryProfitCode:"+inventoryProfitCode);
        ResponseMsg msg = inventoryProfitDetailService.getInventoryProfitDetailList(inventoryProfitCode);
        logger.debug("InventoryProfitDetailController getInventoryProfitDetailList msg:"+msg);
        return msg;
    }

    @Override
    public ResponseMsg delInventoryProfitDetail(String inventoryProfitCode) {
        logger.info("InventoryProfitDetailController delInventoryProfitDetail inventoryProfitCode:"+inventoryProfitCode);
        ResponseMsg msg = inventoryProfitDetailService.delInventoryProfitDetail(inventoryProfitCode);
        logger.debug("InventoryProfitDetailController delInventoryProfitDetail msg:"+msg);
        return msg;
    }

    @Override
    public ResponseMsg insertInventoryProfitDetail(InventoryProfitDetail inventoryProfitDetail) {
        logger.info("InventoryProfitDetailController insertInventoryProfitDetail inventoryProfitDetail:"+inventoryProfitDetail);
        ResponseMsg msg = inventoryProfitDetailService.insertInventoryProfitDetail(inventoryProfitDetail);
        logger.debug("InventoryProfitDetailController insertInventoryProfitDetail msg:"+msg);
        return msg;
    }
}
